-
Notifications
You must be signed in to change notification settings - Fork 213
Multi-Asssignments feature removal #2893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Multi-Asssignments feature removal #2893
Conversation
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
|
avgustinmm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but since bigger commit - better have at least one more review
| "hawkbit.server.error.repo.tenantConfigurationValueChangeNotAllowed", | ||
| "The requested tenant configuration value modification is not allowed."), | ||
| SP_MULTIASSIGNMENT_NOT_ENABLED( | ||
| SP_MULTIASSIGNMENT( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this now removed ?
"The requested operation requires multi assignment to be enabled" is not valid error anymore ?
| private final SoftwareModuleManagement<? extends SoftwareModule> softwareModuleManagement; | ||
| private final DistributionSetManagement<? extends DistributionSet> distributionSetManagement; | ||
| private final DeploymentManagement deploymentManagement; | ||
| private final RepositoryProperties repositoryProperties; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RepositoryProperties not used anymore - was used for getActionWeight that is now removed
private int getWeightConsideringDefault(final Action action) { return action.getWeight().orElse(repositoryProperties.getActionWeightIfAbsent()); }
| import static org.eclipse.hawkbit.repository.model.Action.ActionType.DOWNLOAD_ONLY; | ||
| import static org.eclipse.hawkbit.repository.model.Action.ActionType.FORCED; | ||
|
|
||
| import java.util.AbstractMap.SimpleEntry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
many unused imports after removals
| */ | ||
| @Test | ||
| void getRollout() throws Exception { | ||
| enableMultiAssignments(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strange why it was needed
| final boolean bypassWeightEnforcement = true; | ||
| final boolean multiAssignmentsEnabled = TenantConfigHelper.isMultiAssignmentsEnabled(); | ||
| if (!bypassWeightEnforcement && multiAssignmentsEnabled && hasNoWeight) { | ||
| if (!bypassWeightEnforcement && hasNoWeight) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this always false ?
bypassWeightEnforcment = true
if(!bypassWeightEnforcment && ..
It seems this validateWeight was used only when multiAssignemntEnabled= true ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and hasWeight is actually not used ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to revise but it seems this was only needed when multiassignment was enabled, otherwise not



Multi-Assignments feature removal
Removed all DMF related events - MultiActionAssignEven, MultiActionEvent, MultiActionCancelEvent (also related service events).
Renaming MultiAssignmentIsNotEnabledException to MultiAssignmentException (Thrown when multi-assignment is attampted in a single DeploymentRequest) .
Adapting tests accordingly.